function loadSysInfo() {
	return {
		//API地址测试
		BasePath: `http://8.217.74.24:5002/api/`,
		//ImageAPI地址测试
		ImageBasePath: `http://8.217.74.24:5002/`,
		//Hub地址测试
		HubBasePath: `ws://8.217.74.24:5002/`
		
		// //API地址测试
		// BasePath: `http://localhost:5000/api/`,
		// //ImageAPI地址测试
		// ImageBasePath: `http://localhost:5000/`,
		// //Hub地址测试
		// HubBasePath: `ws://localhost:5000/`
	}
}

export const sysInfo = loadSysInfo();


export const sysUtils = {
	tip: function(msg) {
		console.log(msg)
		switch (msg.icon) {
			case "success":
				msg.sender.messageText = msg.title;
				msg.sender.msgType = 'success';
				msg.sender.duration = 2000;
				msg.sender.$refs.message.open()
				// uni.showToast({
				// 	title: msg.title,
				// 	icon: msg.icon,
				// 	duration: 2000
				// });
				break;
			case "error":
				msg.sender.messageText = msg.title;
				msg.sender.msgType = 'error';
				msg.sender.duration = 2000;
				msg.sender.$refs.message.open()
				// uni.showToast({
				// 	title: msg.title,
				// 	icon: msg.icon,
				// 	duration: 2000
				// });
				break;
			case "info":
				msg.sender.messageText = msg.title;
				msg.sender.msgType = 'info';
				msg.sender.duration = 2000;
				msg.sender.$refs.message.open()
				// uni.showToast({
				// 	title: msg.title,
				// 	icon: msg.icon,
				// 	duration: 2000
				// });
				break;
			default:
				msg.sender.messageText = msg.title;
				msg.sender.msgType = 'info';
				msg.sender.duration = 2000;
				msg.sender.$refs.message.open()
				// uni.showToast({
				// 	title: msg.title,
				// 	icon: "info",
				// 	duration: 2000
				// });
				break;
		}
	},

	showLoading(sender) {
		sender.showLoading();
	},
	hideLoading(sender) {
		sender.hideLoading();
	}
}
